package com.frcdi.qms.common.core.domain.entity;

import com.frcdi.qms.common.annotation.Excel;
import com.frcdi.qms.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 检验项目类型对象 md_project_type
 *
 * @author cell
 * @date 2023-09-12
 */
@ApiModel(value = "检验项目类型对象")
public class ProjectType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 检验项目类型名称 */
    @Excel(name = "检验项目类型名称")
    private String projectTypeName;

    /** 父部门ID */
    @ApiModelProperty("父部门ID")
    private Long parentId;

    /** 祖级列表 */
    @ApiModelProperty("祖级列表")
    private String ancestors;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 子菜单 */
    private List<ProjectType> children = new ArrayList<ProjectType>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setProjectTypeName(String projectTypeName)
    {
        this.projectTypeName = projectTypeName;
    }

    public String getProjectTypeName()
    {
        return projectTypeName;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public List<ProjectType> getChildren() {
        return children;
    }

    public void setChildren(List<ProjectType> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectTypeName", getProjectTypeName())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .toString();
    }
}
